package org.batatasframework.support.event.internal;

import org.batatasframework.support.database.TableInfo;
import org.batatasframework.support.database.metadatas.TableMetadata;
import org.batatasframework.support.database.sql.TableInstance;
import org.batatasframework.support.database.sql.spi.TableCriterion;

import cn.bonoon.kernel.support.IOperator;

public class DefaultSearchableRequest extends AbstractSearchableRequest<TableMetadata>{
	private final TableInfo tableInfo;
	
	public DefaultSearchableRequest(IOperator operator, String schemaName, String catalogName, String tableName) {
		super(operator);
		this.tableInfo = new TableInfo(schemaName, catalogName, tableName);
	}

	public DefaultSearchableRequest(IOperator operator, TableMetadata sourceTableMetadata) {
		super(operator);
		this.sourceTableMetadata = sourceTableMetadata;
		this.tableInfo = sourceTableMetadata.getTableInfo();
	}

	@Override
	public TableInfo getTableInfo() {
		return tableInfo;
	}

	@Override
	public void resolve(TableInstance tableInstance, TableCriterion tableCriterion) throws Exception {}

}
